package excercise.Page30;

/**
 * @Author: Miyako
 * @Date: 2024-07-17-9:02
 * @Description: 子弹属性 发射子弹，装子弹方法
 */
public class Ak47 {
    int bullets = 100;

   public void  fire(){
        if (bullets==0){
            System.out.println("子弹打完了，请先换弹夹");
        }
        else {
            bullets--;
        }
    }

    public void supBullets (){
        bullets=100;
        System.out.println("已装满弹夹");
    }
}
